Repository navigation
fix: render check regex escapes; ship the ./testing subpath - #127
Merged
Merged
Conversation
The in-page check parts were plain template literals, so a backslash in the page's code never reached the page: content.ts's long-line loop got /s/ for /\s/ (the letter s counted as blank, every real space as text), and input-label split aria-labelledby on /s+/ and called labelled inputs unlabelled. Biome's noUselessEscapeInString safe fix had deleted one of them. Every part is now a String.raw template; the rule is an error with its fix off; tests assert the guard, the evaluated whitespace regex, and the checks' behaviour in happy-dom and real Chrome (red on the old code). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Madraka <[email protected]>
storage, analytics, comments and schedules export ./testing (documented in their READMEs, the released storage changelog and RFC-0004/0006/0007/0008), but build-packages skipped every testing.ts, so the published import failed with ERR_MODULE_NOT_FOUND. A testing.ts now ships where exports name it; other packages' testing.ts and all *.test.* files stay out. vitest (>=3) and, for storage, miniflare (*) are optional peers, wide on purpose: npm stops with ERESOLVE on a mismatched optional peer of a direct dependency, and no range matches wrangler's prerelease miniflare. build-packages now verifies every published exports/bin target exists (scripts/verify-exports.ts, also --verify), packaging tests cover the ship rule, and smoke-pack installs the four packages next to vitest 4 and miniflare 3. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Madraka <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two bugs found while fixing #116 (PR #124).
1. render_page checks lost their regex escapes (
@cloudhal/mcp-server)The in-page check parts were plain template literals, so backslashes never reached the page:
/s/instead of/\s/. The letter "s" counted as blank, and every real space and indentation run counted as text.aria-labelledbywas split on/s+/, so labelled inputs were reported as unlabelled.Biome's
noUselessEscapeInStringsafe fix had already deleted one of these backslashes, andpnpm lint:fixwould have deleted the other.Fix:
String.raw.errorwithfix: "none".A repo-wide Babel scan of every embedded script found no other lost escapes.
Measured: on cloudhal.com the 91–95 characters per line flagged by long-line were real; the 736 px column holds about 92 characters a line either way. The bug changes the count for text with indentation, inline elements or "ss".
2. The published
./testingsubpath was missing (@cloudhal/storage,analytics,comments,schedules)Problem: these four packages export
./testing. Their READMEs, the released storage changelog and RFC-0004/0006/0007/0008 present it as public. Butbuild-packagesskipped everytesting.ts, so importing it from npm failed withERR_MODULE_NOT_FOUND.Fix:
testing.tsnow ships whereexportsnames it. Other packages'testing.tsand every*.test.*file stay out.vitest(>=3) and, for storage,miniflare(*) are optional peers. The ranges are wide on purpose: npm hard-fails with ERESOLVE on a mismatched optional peer of a direct dependency, and no range matches wrangler's prerelease miniflare.exports/bintarget exists (scripts/verify-exports.ts, also available as--verify).smoke-packinstalls the four packages next to vitest 4 and miniflare 3.Verification (local, one command at a time)
--verifyreports 8 missing targets; with the fix, 0.render-chromeandrender-chrome-textpass, none skipped.build-packages --checkpasses.smoke-packpasses, and all 13 tarballs have 0 missing exports.pnpm check: biome, size, typecheck 20/20, test 19/19, 4,855 tests.The work was reviewed by three independent reviewers, and each finding went through a separate refutation round. The peer ranges were widened as a result.
Checklist
pnpm checkpasses locally (serial).cargo test --workspace: no Rust or contract changes..changeset/render-check-escapes.md,.changeset/testing-subpath-ships.mdgit commit -s, DCO)🤖 Generated with Claude Code